﻿using Microsoft.Extensions.DependencyInjection;
using System;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.SqlSugarCore;
using Volo.Abp.SqlSugarCore.Configs;

namespace TianShu.TenantManagement.Dal.Abstracts
{
    [DependsOn(
        typeof(TianShuSqlSugarCoreModule),
        typeof(AbpMultiTenancyModule)
        )]
    public class TianShuTenantManagementDalAbstractsModule:AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddSqlSugarRepositories(typeof(TianShuTenantManagementDalAbstractsModule).Assembly);

            //配置实体生成
            Configure<SugarAutoGeneratorTableOptions>(opt =>
            {
                opt.Add(typeof(TianShuTenantManagementDalAbstractsModule));
            });
        }
    }
}
